<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wrap{
            display: flex;
            /* 设置换行 */
            flex-wrap: wrap;
        }
        .box{
            width: 300px;
            height: 200px;
            background-color: pink;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
    </div>
</body>
</html>